package com.example.learn.controller;

import com.example.learn.domain.Topleftmethod;
import com.example.learn.entity.Statistical;
import com.example.learn.entity.User;
import com.example.learn.service.MyechartService;
import com.example.learn.service.StatisticalService;
import com.example.learn.token.CurrentUser;
import com.example.learn.token.UserLoginToken;
import com.example.learn.utile.Response.BaseResponse;
import com.example.learn.utile.Response.ObjectRestResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/myechart")
public class MyechartController {
    @Autowired
    MyechartService myechartService;

    @UserLoginToken
    @RequestMapping(value = "topleftmethod",method = RequestMethod.POST)
    public BaseResponse topleftmethod( @CurrentUser User user){
            Topleftmethod topleftmethod    = myechartService.topleftmethod(user);
        return new ObjectRestResponse().data(topleftmethod);
    }

}
